package demo02;

public class Demo02PhoneTwo {
    public static void main(String[] args) {
        //根据phone类，创建一个名为one的对象
        //格式：类名称 对象名 = new 类名称();
        Phone one =new Phone();
        System.out.println(one.brand);//null
        System.out.println(one.price);//0.0
        System.out.println(one.color);//null

        one.brand ="苹果";
        one.color="black";
        one.price=8888;
        System.out.println(one.price);
        System.out.println(one.brand );
        System.out.println(one.color );
        System.out.println("================");

        one.call("乔布斯");
        one.sendMessage();
        Phone two =new Phone();
        System.out.println(two.brand);//null
        System.out.println(two.price);//0.0
        System.out.println(two.color);//null


        System.out.println(two.brand);//null
        System.out.println(two.price);//0.0
        System.out.println(two.color);//null

        System.out.println("================");
        two.brand ="三星";
        two.color="black";
        two.price=6888;
        System.out.println(two .price);//6888
        System.out.println(two.brand );//三星
        System.out.println(two.color );//black
        System.out.println("================");

        one.call("欧巴");
        one.sendMessage();

    }
}
